<!DOCTYPE html>
<html lang="en-us">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>openGauss Blog  | Guidance to Post a Blog</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    
    <link rel="shortcut icon" href="https://xzx666.gitee.io/lookeng/img/favicon.ico" type="image/x-icon" />
    <link rel="apple-touch-icon" href="https://xzx666.gitee.io/lookeng/img/apple-touch-icon.png" />

    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

    
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
    
    <link rel="stylesheet" href="https://xzx666.gitee.io/lookeng/css/commen.css?t=1607593671000" />
    <link rel="stylesheet" href="https://xzx666.gitee.io/lookeng/css/blog.css?t=1607593671000" />
    <link rel="stylesheet" href="https://xzx666.gitee.io/lookeng/css/mobile.css?t=1607593671000" />
    <link rel="stylesheet" href="https://xzx666.gitee.io/lookeng/css/pagination.css?t=1607593671000">
    
    <script>
      var _hmt = _hmt || [];
      (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?34e9f585f29581007941aa1698181871";
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
</head>
<body>
  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src='//unpkg.com/valine/dist/Valine.min.js'></script>


<div class="blog-banner">
    <h1>Blog</h1>
    <img class="pc-banner" src="https://xzx666.gitee.io/lookeng/img/blog-banner-pc.png">
    <img class="h5-banner" src="https://xzx666.gitee.io/lookeng/img/blog-banner-h5.png">
</div>





<div class="container">
    <div class="columns blog-detail">
        <div class="post_detail">
            <div class="is-child box">
                <div class="breadCrumb"><a href="\en\">Blog/</a></div>
                <div class="blog-detail-header">
                    <h1>Guidance to Post a Blog</h1>
                    <div class="blog-detail-prop">
                        <img src="https://xzx666.gitee.io/lookeng/img/icon-date.png">
                        <span class="article_right_date">0001-01-01</span>
                        <img src="https://xzx666.gitee.io/lookeng/img/icon-author.png">
                        <span class="article_right_author"></span>
                        <img src="https://xzx666.gitee.io/lookeng/img/icon-view.png">
                        <span id="/en/guidance/index_/" class="leancloud_visitors" data-flag-title="Guidance to Post a Blog">
                            <i class="leancloud-visitors-count"></i>                     
                        </span>
                    </div>
                    <div class="blog-detail-tags">
                        <img src="https://xzx666.gitee.io/lookeng/img/icon-tag.png">
                        
                    </div>
                </div>
                <div class="content blog-content">
                    

<h2 id="preparation">Preparation</h2>

<ol>
<li><p>Refer to <a href="http://git.mydoc.io/?t=179267" target="_blank">http: //git.mydoc.io/?t=179267</a> to register Gitee account.</p></li>

<li><p>Set your primary mail box in gitee settings <a href="https://gitee.com/profile/emails" target="_blank">https: //gitee.com/profile/emails</a>.</p></li>

<li><p>Sign your CLA in <a href="https://opengauss.org/zh/cla.html">https://opengauss.org/zh/cla.html</a>.</p></li>

<li><p>Prepare your git environment refering to <a href="http://git.mydoc.io/?t=180692" target="_blank">http: //git.mydoc.io/?t=180692</a>.</p></li>
</ol>

<h2 id="understand-blog-format">Understand blog format</h2>

<p>The blog is written in markdown format.
You can read <a href="https://gitee.com/opengauss/blog/blob/master/design/content_posts.md">https://gitee.com/opengauss/blog/blob/master/design/content_posts.md</a> to get understand how the blog is designed.</p>

<p>The head includes the following information:</p>

<pre><code>+++
title = &quot;Sample Post&quot;
date = &quot;2020-03-03&quot;
tags = [&quot;Sample&quot;, &quot;ABC&quot;, &quot;cccc&quot;]
archives = &quot;2020-03&quot;
author = &quot;Blog Maintainer&quot;
summary = &quot;Just about everything you'll need to style in the theme: headings, paragraphs, blockquotes, tables, code blocks, and more.&quot;
+++

Here you can edit your blog. 
</code></pre>

<p>Tips: you can copy content/_example/2020-03-03-sample-post.md to your folder and edit it.</p>

<h2 id="post-your-blog">Post your blog</h2>

<p>The blog posting follows the pull request of <a href="https://gitee.com" target="_blank">Gitee</a>.</p>

<ol>
<li><p>Fork openGauss blog project <a href="https://gitee.com/opengauss/blog">https://gitee.com/opengauss/blog</a> to your own gitee. Refer to <a href="http://git.mydoc.io/?t=153749">http://git.mydoc.io/?t=153749</a> for detailed guidance.</p></li>

<li><p>Clone the code to your local environment.</p>

<pre><code>git clone https://gitee.com/&lt;your-gitee-id&gt;/blog
</code></pre></li>

<li><p>Create a branch</p>

<pre><code>git checkout -b &lt;branch-name&gt;
</code></pre></li>

<li><p>Create a folder in the blog floder</p>

<pre><code>cd content\post
mkdir &lt;your-gitee-id&gt;
cd &lt;your-gitee-id&gt;
touch YEAR-MONTH-DAY-title.md
</code></pre></li>
</ol>

<p>And You can put the resources in the same folder as your text file&rsquo;s, and name the resources as</p>

<pre><code>YEAR-MONTH-DAY-title-NN.MARKUP
</code></pre>

<p>Where the YEAR, MONTH, DAY, and title are the same as your blog file, and NN is the serial number of the pictures, like 01, 02 and so on. The MARKUP is the file extension, and for pictures it is recommended to use png.
The following are one example.</p>

<pre><code>2020-01-01-new-years-is-coming.md
2020-01-01-new-years-is-coming-01.png
2020-01-01-new-years-is-coming-02.gif
2020-01-01-new-years-is-coming-03.pdf
</code></pre>

<ol>
<li><p>Commit your post</p>

<pre><code>git add &lt;file-path&gt;
git commit -m &quot;&lt;message&gt;&quot;
git push origin &lt;branch-name&gt;:&lt;branch-name&gt;
</code></pre></li>

<li><p>Refer to <a href="http://git.mydoc.io/?t=153749" target="_blank">http: //git.mydoc.io/?t=153749</a>to submit your Pull Request</p></li>

<li><p>Wait for reviewing and merging.</p></li>
</ol>

                </div>
            </div>
            <div class="box" style="margin-top:15px;">
                <div style="font-size:14px;color:gray"><strong>[Disclaimer]</strong>This article only represents the author&#39;s opinions, and is irrelevant to this website. This website is neutral in terms of the statements and opinions in this article, and does not provide any express or implied warranty of accuracy, reliability, or completeness of the contents contained therein. This article is for readers&#39; reference only, and all legal responsibilities arising therefrom are borne by the reader himself.</div>
            </div>
            <div class="post-comment">
                
                  
  <link rel="stylesheet" href="https://xzx666.gitee.io/lookeng/css/custom.css" />
  <div id="vcomments" lang="en-us" mess="Please leave a message..."></div>

  <script type="text/javascript">
    const placeholder = document.getElementById("vcomments").getAttribute("mess"),
          lang = document.getElementById("vcomments").getAttribute("lang");
    const  langs = lang == "zh-cn" ? "zh-cn" : "en";
    new Valine({
        el: '#vcomments' ,
        appId: '6wfgavgIRqmpC3hjHqQVtFWF-gzGzoHsz',
        appKey: 'QRqrBDBB0p0YhrGe9IJ169ip',
        avatar:'mm', 
        placeholder: placeholder,
        visitor: true,
		    meta: ['nick','mail','link'],
        lang: langs
    });
  </script>
            </div>
        </div>
    </div>
</div>
<script>
    $(function (){
        var query = new AV.Query('Counter');
        query.equalTo('url', decodeURIComponent('\/en\/guidance\/index_\/'));
        query.find().then(function (data) {
            if(data.length && (data[0].attributes.author === 'openGauss')){
                var counter = AV.Object.createWithoutData('Counter', data[0].id);
                counter.set('author', '');
                counter.save();
            }
        })
    })
</script>







<input id="iframeUrl" type="text" style="display: none;" value=https://xzx666.gitee.io/>




<script defer src="https://xzx666.gitee.io/lookengjs/all.js"></script>
<script src="https://xzx666.gitee.io/lookengjs/flexible.js"></script>
<script>
  const hash = window.location.search,
        pageurl = window.location.href;
  var langss = document.querySelector("html").lang === "zh-cn" ? "zh" : "en";
  console.log("hash:",hash,"pageurl:",pageurl,"ttr",pageurl.split(langss + "/")[1])

  if(!document.getElementById("vcomments")) {
    new Valine({
        appId: '6wfgavgIRqmpC3hjHqQVtFWF-gzGzoHsz',
        appKey: 'QRqrBDBB0p0YhrGe9IJ169ip',
        avatar:'mm',
        visitor: true,
		    meta: ['nick','mail','link']
    });
  }
 
  
    


    const url = document.getElementById("iframeUrl").value;

    function observe (el, options, callback) {
      var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver
      var observer = new MutationObserver(callback)
      observer.observe(el, options)
    }

    var options = {
        childList: true,
        subtree: true,
        characterData: true
      }
    observe(document.body, options, (records, instance) => {
    const height = document.body.scrollHeight;
    parent.postMessage(height,url);
    })
    if(pageurl.split(langss + "/")[1]) parent.postMessage(pageurl.split(langss + "/")[1],url);
    

    if(document.querySelector("#notFound")) parent.postMessage("我404了",url);

</script>
</body>
</html>
